package com.pojo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class OrderExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrderExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOIdIsNull() {
            addCriterion("o_id is null");
            return (Criteria) this;
        }

        public Criteria andOIdIsNotNull() {
            addCriterion("o_id is not null");
            return (Criteria) this;
        }

        public Criteria andOIdEqualTo(Integer value) {
            addCriterion("o_id =", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotEqualTo(Integer value) {
            addCriterion("o_id <>", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdGreaterThan(Integer value) {
            addCriterion("o_id >", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_id >=", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdLessThan(Integer value) {
            addCriterion("o_id <", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdLessThanOrEqualTo(Integer value) {
            addCriterion("o_id <=", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdIn(List<Integer> values) {
            addCriterion("o_id in", values, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotIn(List<Integer> values) {
            addCriterion("o_id not in", values, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdBetween(Integer value1, Integer value2) {
            addCriterion("o_id between", value1, value2, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotBetween(Integer value1, Integer value2) {
            addCriterion("o_id not between", value1, value2, "oId");
            return (Criteria) this;
        }

        public Criteria andODateIsNull() {
            addCriterion("o_date is null");
            return (Criteria) this;
        }

        public Criteria andODateIsNotNull() {
            addCriterion("o_date is not null");
            return (Criteria) this;
        }

        public Criteria andODateEqualTo(Date value) {
            addCriterion("o_date =", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateNotEqualTo(Date value) {
            addCriterion("o_date <>", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateGreaterThan(Date value) {
            addCriterion("o_date >", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateGreaterThanOrEqualTo(Date value) {
            addCriterion("o_date >=", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateLessThan(Date value) {
            addCriterion("o_date <", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateLessThanOrEqualTo(Date value) {
            addCriterion("o_date <=", value, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateIn(List<Date> values) {
            addCriterion("o_date in", values, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateNotIn(List<Date> values) {
            addCriterion("o_date not in", values, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateBetween(Date value1, Date value2) {
            addCriterion("o_date between", value1, value2, "oDate");
            return (Criteria) this;
        }

        public Criteria andODateNotBetween(Date value1, Date value2) {
            addCriterion("o_date not between", value1, value2, "oDate");
            return (Criteria) this;
        }

        public Criteria andTIdIsNull() {
            addCriterion("t_id is null");
            return (Criteria) this;
        }

        public Criteria andTIdIsNotNull() {
            addCriterion("t_id is not null");
            return (Criteria) this;
        }

        public Criteria andTIdEqualTo(Integer value) {
            addCriterion("t_id =", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdNotEqualTo(Integer value) {
            addCriterion("t_id <>", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdGreaterThan(Integer value) {
            addCriterion("t_id >", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("t_id >=", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdLessThan(Integer value) {
            addCriterion("t_id <", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdLessThanOrEqualTo(Integer value) {
            addCriterion("t_id <=", value, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdIn(List<Integer> values) {
            addCriterion("t_id in", values, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdNotIn(List<Integer> values) {
            addCriterion("t_id not in", values, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdBetween(Integer value1, Integer value2) {
            addCriterion("t_id between", value1, value2, "tId");
            return (Criteria) this;
        }

        public Criteria andTIdNotBetween(Integer value1, Integer value2) {
            addCriterion("t_id not between", value1, value2, "tId");
            return (Criteria) this;
        }

        public Criteria andOStatusIsNull() {
            addCriterion("o_status is null");
            return (Criteria) this;
        }

        public Criteria andOStatusIsNotNull() {
            addCriterion("o_status is not null");
            return (Criteria) this;
        }

        public Criteria andOStatusEqualTo(String value) {
            addCriterion("o_status =", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusNotEqualTo(String value) {
            addCriterion("o_status <>", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusGreaterThan(String value) {
            addCriterion("o_status >", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusGreaterThanOrEqualTo(String value) {
            addCriterion("o_status >=", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusLessThan(String value) {
            addCriterion("o_status <", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusLessThanOrEqualTo(String value) {
            addCriterion("o_status <=", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusLike(String value) {
            addCriterion("o_status like", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusNotLike(String value) {
            addCriterion("o_status not like", value, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusIn(List<String> values) {
            addCriterion("o_status in", values, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusNotIn(List<String> values) {
            addCriterion("o_status not in", values, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusBetween(String value1, String value2) {
            addCriterion("o_status between", value1, value2, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOStatusNotBetween(String value1, String value2) {
            addCriterion("o_status not between", value1, value2, "oStatus");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyIsNull() {
            addCriterion("o_total_money is null");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyIsNotNull() {
            addCriterion("o_total_money is not null");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyEqualTo(BigDecimal value) {
            addCriterion("o_total_money =", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyNotEqualTo(BigDecimal value) {
            addCriterion("o_total_money <>", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyGreaterThan(BigDecimal value) {
            addCriterion("o_total_money >", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("o_total_money >=", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyLessThan(BigDecimal value) {
            addCriterion("o_total_money <", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyLessThanOrEqualTo(BigDecimal value) {
            addCriterion("o_total_money <=", value, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyIn(List<BigDecimal> values) {
            addCriterion("o_total_money in", values, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyNotIn(List<BigDecimal> values) {
            addCriterion("o_total_money not in", values, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("o_total_money between", value1, value2, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalMoneyNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("o_total_money not between", value1, value2, "oTotalMoney");
            return (Criteria) this;
        }

        public Criteria andOTotalNumIsNull() {
            addCriterion("o_total_num is null");
            return (Criteria) this;
        }

        public Criteria andOTotalNumIsNotNull() {
            addCriterion("o_total_num is not null");
            return (Criteria) this;
        }

        public Criteria andOTotalNumEqualTo(Integer value) {
            addCriterion("o_total_num =", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumNotEqualTo(Integer value) {
            addCriterion("o_total_num <>", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumGreaterThan(Integer value) {
            addCriterion("o_total_num >", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_total_num >=", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumLessThan(Integer value) {
            addCriterion("o_total_num <", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumLessThanOrEqualTo(Integer value) {
            addCriterion("o_total_num <=", value, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumIn(List<Integer> values) {
            addCriterion("o_total_num in", values, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumNotIn(List<Integer> values) {
            addCriterion("o_total_num not in", values, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumBetween(Integer value1, Integer value2) {
            addCriterion("o_total_num between", value1, value2, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOTotalNumNotBetween(Integer value1, Integer value2) {
            addCriterion("o_total_num not between", value1, value2, "oTotalNum");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateIsNull() {
            addCriterion("o_payoff_date is null");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateIsNotNull() {
            addCriterion("o_payoff_date is not null");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateEqualTo(Date value) {
            addCriterion("o_payoff_date =", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateNotEqualTo(Date value) {
            addCriterion("o_payoff_date <>", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateGreaterThan(Date value) {
            addCriterion("o_payoff_date >", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateGreaterThanOrEqualTo(Date value) {
            addCriterion("o_payoff_date >=", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateLessThan(Date value) {
            addCriterion("o_payoff_date <", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateLessThanOrEqualTo(Date value) {
            addCriterion("o_payoff_date <=", value, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateIn(List<Date> values) {
            addCriterion("o_payoff_date in", values, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateNotIn(List<Date> values) {
            addCriterion("o_payoff_date not in", values, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateBetween(Date value1, Date value2) {
            addCriterion("o_payoff_date between", value1, value2, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOPayoffDateNotBetween(Date value1, Date value2) {
            addCriterion("o_payoff_date not between", value1, value2, "oPayoffDate");
            return (Criteria) this;
        }

        public Criteria andOSerialNoIsNull() {
            addCriterion("o_serial_no is null");
            return (Criteria) this;
        }

        public Criteria andOSerialNoIsNotNull() {
            addCriterion("o_serial_no is not null");
            return (Criteria) this;
        }

        public Criteria andOSerialNoEqualTo(String value) {
            addCriterion("o_serial_no =", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoNotEqualTo(String value) {
            addCriterion("o_serial_no <>", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoGreaterThan(String value) {
            addCriterion("o_serial_no >", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoGreaterThanOrEqualTo(String value) {
            addCriterion("o_serial_no >=", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoLessThan(String value) {
            addCriterion("o_serial_no <", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoLessThanOrEqualTo(String value) {
            addCriterion("o_serial_no <=", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoLike(String value) {
            addCriterion("o_serial_no like", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoNotLike(String value) {
            addCriterion("o_serial_no not like", value, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoIn(List<String> values) {
            addCriterion("o_serial_no in", values, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoNotIn(List<String> values) {
            addCriterion("o_serial_no not in", values, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoBetween(String value1, String value2) {
            addCriterion("o_serial_no between", value1, value2, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andOSerialNoNotBetween(String value1, String value2) {
            addCriterion("o_serial_no not between", value1, value2, "oSerialNo");
            return (Criteria) this;
        }

        public Criteria andDinerNumIsNull() {
            addCriterion("diner_num is null");
            return (Criteria) this;
        }

        public Criteria andDinerNumIsNotNull() {
            addCriterion("diner_num is not null");
            return (Criteria) this;
        }

        public Criteria andDinerNumEqualTo(Integer value) {
            addCriterion("diner_num =", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumNotEqualTo(Integer value) {
            addCriterion("diner_num <>", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumGreaterThan(Integer value) {
            addCriterion("diner_num >", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("diner_num >=", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumLessThan(Integer value) {
            addCriterion("diner_num <", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumLessThanOrEqualTo(Integer value) {
            addCriterion("diner_num <=", value, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumIn(List<Integer> values) {
            addCriterion("diner_num in", values, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumNotIn(List<Integer> values) {
            addCriterion("diner_num not in", values, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumBetween(Integer value1, Integer value2) {
            addCriterion("diner_num between", value1, value2, "dinerNum");
            return (Criteria) this;
        }

        public Criteria andDinerNumNotBetween(Integer value1, Integer value2) {
            addCriterion("diner_num not between", value1, value2, "dinerNum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}